﻿using System;
using System.IO;
using OpenLS.Spreadsheet.Formats.Biff.Tokens;

namespace OpenLS.Spreadsheet.Formats.Biff.Records
{

    class SharedParsedFormula: ParsedFormulaBase
    {
        private FormulaReadContextType _contextType;

        public void Read(FormulaReadContext context)
        {
            this._contextType = context.Type;
            var formulaLength = context.Reader.ReadUInt16();


            Read(context, formulaLength);
        }

        public void Write(BinaryWriter writer)
        {
            WriteCell(new FormulaWriteContext(writer, _contextType));
        }

        protected override Cell GetReferenceCell(Cell cell)
        {
            return null;
        }
    }
}